package com.qrcode.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author jiangwz
 * @create 2019/9/26.
 */
@RestController
public class TestController {

    /**
     * @GetMapping()
     * "/"  不加这个默认所有资源都返回hello
     * @return
     */
    @GetMapping("/")
    public String sayHello(){
        return "hello";
    }

    @GetMapping("/qrcode.html")
    public ModelAndView toHtml(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("qrcode");
        return modelAndView;
    }
}
